package com.equdao.car_violation_inquiry.service.impl;

import com.equdao.car_violation_inquiry.dao.ChannelManageMapper;
import com.equdao.car_violation_inquiry.pojo.ChannelManageDO;
import com.equdao.car_violation_inquiry.service.ChannelManageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: 杨忠强
 * @Date: 2018/6/4 17:56
 * @Description:
 */
@Service
public class ChannelManageServiceImpl implements ChannelManageService{

    @Autowired
    ChannelManageMapper channelManageMapper;

    @Override
    public Integer saveChannel(ChannelManageDO channelManageDO) {
        return channelManageMapper.saveChannel(channelManageDO);
    }

    @Override
    public ChannelManageDO findChannelById(Integer id) {
        return channelManageMapper.findChannelById(id);
    }

    @Override
    public List<ChannelManageDO> findChannelList() {
        return channelManageMapper.findChannelList();
    }

    @Override
    public Integer updateChannel(ChannelManageDO channelManageDO) {
        Integer integer = channelManageMapper.updateChannelById(channelManageDO);

        return integer;
    }

    @Override
    public ChannelManageDO findChannelByChannelCode(String channelCode) {
        return channelManageMapper.findChannelByChannelCode(channelCode);
    }
}
